3.2.24 \(\int \frac {a+c x^4}{d+e x^2} \, dx\) [124]

Optimal. Leaf size=55 \[ -\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2+a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}} \]

[Out]

-c*d*x/e^2+1/3*c*x^3/e+(a*e^2+c*d^2)*arctan(x*e^(1/2)/d^(1/2))/e^(5/2)/d^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1168, 211} \begin {gather*} \frac {\left (a e^2+c d^2\right ) \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}}-\frac {c d x}{e^2}+\frac {c x^3}{3 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + c*x^4)/(d + e*x^2),x]

[Out]

-((c*d*x)/e^2) + (c*x^3)/(3*e) + ((c*d^2 + a*e^2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(5/2))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1168

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a
 + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps

\begin {align*} \int \frac {a+c x^4}{d+e x^2} \, dx &=\int \left (-\frac {c d}{e^2}+\frac {c x^2}{e}+\frac {c d^2+a e^2}{e^2 \left (d+e x^2\right )}\right ) \, dx\\ &=-\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\left (a+\frac {c d^2}{e^2}\right ) \int \frac {1}{d+e x^2} \, dx\\ &=-\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2+a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 55, normalized size = 1.00 \begin {gather*} -\frac {c d x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2+a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + c*x^4)/(d + e*x^2),x]

[Out]

-((c*d*x)/e^2) + (c*x^3)/(3*e) + ((c*d^2 + a*e^2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(5/2))

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 47, normalized size = 0.85

method result size
default \(-\frac {c \left (-\frac {1}{3} e \,x^{3}+d x \right )}{e^{2}}+\frac {\left (a \,e^{2}+c \,d^{2}\right ) \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{e^{2} \sqrt {d e}}\) \(47\)
risch \(\frac {c \,x^{3}}{3 e}-\frac {c d x}{e^{2}}-\frac {\ln \left (e x +\sqrt {-d e}\right ) a}{2 \sqrt {-d e}}-\frac {\ln \left (e x +\sqrt {-d e}\right ) c \,d^{2}}{2 e^{2} \sqrt {-d e}}+\frac {\ln \left (-e x +\sqrt {-d e}\right ) a}{2 \sqrt {-d e}}+\frac {\ln \left (-e x +\sqrt {-d e}\right ) c \,d^{2}}{2 e^{2} \sqrt {-d e}}\) \(113\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^4+a)/(e*x^2+d),x,method=_RETURNVERBOSE)

[Out]

-c/e^2*(-1/3*e*x^3+d*x)+(a*e^2+c*d^2)/e^2/(d*e)^(1/2)*arctan(e*x/(d*e)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 42, normalized size = 0.76 \begin {gather*} \frac {{\left (c d^{2} + a e^{2}\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {5}{2}\right )}}{\sqrt {d}} + \frac {1}{3} \, {\left (c x^{3} e - 3 \, c d x\right )} e^{\left (-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^4+a)/(e*x^2+d),x, algorithm="maxima")

[Out]

(c*d^2 + a*e^2)*arctan(x*e^(1/2)/sqrt(d))*e^(-5/2)/sqrt(d) + 1/3*(c*x^3*e - 3*c*d*x)*e^(-2)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 128, normalized size = 2.33 \begin {gather*} \left [\frac {{\left (2 \, c d x^{3} e^{2} - 6 \, c d^{2} x e - 3 \, {\left (c d^{2} + a e^{2}\right )} \sqrt {-d e} \log \left (\frac {x^{2} e - 2 \, \sqrt {-d e} x - d}{x^{2} e + d}\right )\right )} e^{\left (-3\right )}}{6 \, d}, \frac {{\left (c d x^{3} e^{2} - 3 \, c d^{2} x e + 3 \, {\left (c d^{2} + a e^{2}\right )} \sqrt {d} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\frac {1}{2}}\right )} e^{\left (-3\right )}}{3 \, d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^4+a)/(e*x^2+d),x, algorithm="fricas")

[Out]

[1/6*(2*c*d*x^3*e^2 - 6*c*d^2*x*e - 3*(c*d^2 + a*e^2)*sqrt(-d*e)*log((x^2*e - 2*sqrt(-d*e)*x - d)/(x^2*e + d))
)*e^(-3)/d, 1/3*(c*d*x^3*e^2 - 3*c*d^2*x*e + 3*(c*d^2 + a*e^2)*sqrt(d)*arctan(x*e^(1/2)/sqrt(d))*e^(1/2))*e^(-
3)/d]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (49) = 98\).
time = 0.16, size = 104, normalized size = 1.89 \begin {gather*} - \frac {c d x}{e^{2}} + \frac {c x^{3}}{3 e} - \frac {\sqrt {- \frac {1}{d e^{5}}} \left (a e^{2} + c d^{2}\right ) \log {\left (- d e^{2} \sqrt {- \frac {1}{d e^{5}}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{d e^{5}}} \left (a e^{2} + c d^{2}\right ) \log {\left (d e^{2} \sqrt {- \frac {1}{d e^{5}}} + x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**4+a)/(e*x**2+d),x)

[Out]

-c*d*x/e**2 + c*x**3/(3*e) - sqrt(-1/(d*e**5))*(a*e**2 + c*d**2)*log(-d*e**2*sqrt(-1/(d*e**5)) + x)/2 + sqrt(-
1/(d*e**5))*(a*e**2 + c*d**2)*log(d*e**2*sqrt(-1/(d*e**5)) + x)/2

________________________________________________________________________________________

Giac [A]
time = 3.23, size = 44, normalized size = 0.80 \begin {gather*} \frac {{\left (c d^{2} + a e^{2}\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {5}{2}\right )}}{\sqrt {d}} + \frac {1}{3} \, {\left (c x^{3} e^{2} - 3 \, c d x e\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^4+a)/(e*x^2+d),x, algorithm="giac")

[Out]

(c*d^2 + a*e^2)*arctan(x*e^(1/2)/sqrt(d))*e^(-5/2)/sqrt(d) + 1/3*(c*x^3*e^2 - 3*c*d*x*e)*e^(-3)

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 45, normalized size = 0.82 \begin {gather*} \frac {c\,x^3}{3\,e}+\frac {\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )\,\left (c\,d^2+a\,e^2\right )}{\sqrt {d}\,e^{5/2}}-\frac {c\,d\,x}{e^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + c*x^4)/(d + e*x^2),x)

[Out]

(c*x^3)/(3*e) + (atan((e^(1/2)*x)/d^(1/2))*(a*e^2 + c*d^2))/(d^(1/2)*e^(5/2)) - (c*d*x)/e^2

________________________________________________________________________________________